<%@ page language="java" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<%@ include file="/pub/head_latest.inc"%>
<title>模板</title>
<style type="text/css">
.mainsearch{
	background: transparent;
}
.mainsearch>.searchbox{
	padding: 0px;
}
.report-block{
    padding: 20px;
    background: #fff;
    margin-bottom: 10px;
}
.report-span{
	display: inline-block;
	width: 28%;
	margin: 0 2%;
	text-align: left;
	font-size: 14px;
	color: #333;
	cursor: pointer;
}
</style>
</head>
<body>
	<!-- Search Form -->
	<div class="mainsearch" style="width: 98%">
		<div class="search-header">${template.name}</div>
		<div class="searchbox">
			<c:if test="${fn:length(template.detail)>10}">
				<c:forEach items="${template.detail}" var="o" varStatus="idx">
					<c:if test="${idx.count%3==1}">
						<div class="report-block">
					</c:if>
					<span class="report-span" id="${o.report.code}" name="${o.report.name}"><i class="fa fa-file-text-o"></i> ${o.report.name}</span>
					<c:if test="${idx.count%3==0}">
						</div>
					</c:if>
				</c:forEach>
			</c:if>
			<c:if test="${fn:length(template.detail)<=10}">
				<c:forEach items="${template.detail}" var="o" varStatus="idx">
					<c:if test="${idx.count%2!=0}">
						<div class="report-block">
					</c:if>
					<span class="report-span" id="${o.report.code}" name="${o.report.name}"><i class="fa fa-file-text-o"></i> ${o.report.name}</span>
					<c:if test="${idx.count%2==0}">
						</div>
					</c:if>
				</c:forEach>
			</c:if>
		</div>
	</div>

	<script type="text/javascript">
		$(".report-span").click(function(){
			parent.f_addTab("${module.module}"+$(this).attr("id"), $(this).attr("name"), "${baseURL}/report/view/report/report.do?reportTemplateCode="+$(this).attr("id")+"&menuId=${param.menuId}");
		});
	</script>
</body>
</html>